﻿<%@ WebHandler Language="C#" Class="list" %>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Text;
using System.Web.Script.Serialization;
using System.Web.SessionState;
using System.Web.Services;
using System.IO;
using System.Drawing;


public class list : IHttpHandler, System.Web.SessionState.IRequiresSessionState
{
    private StringBuilder sb = null;
    public DataSet ds = null;
    public DataTable dt = null;
    private string sqlwhere = "";
    public void ProcessRequest (HttpContext context) {
        string type = PageBase.ext_string(context.Request.Params["type"]);
        switch (type)
        {
            //查询类型下拉选项
            case "getstoreinfo":
                getstoreinfo(context);
                break;
            //查询类型下拉选项
            case "get_managesp":
                get_managesp(context);
                break;
            //查询类型下拉选项
            case "get_manageqy":
                get_manageqy(context);
                break;
            //查询类型下拉选项
            case "get_manageyw":
                get_manageyw(context);
                break;
            //查询类型下拉选项
            case "get_roles":
                get_roles(context);
                break;
            //查询上传图片信息
            case "getlist":
                getinfo_list(context);
                break;
            //新增
            case "add":
                add(context);
                break;
            //修改
            case "edit":
                edit(context);
                break;
            //删除
            case "delete":
                delete(context);
                break;
            //启用
            case "start":
                start(context);
                break;
            //根据id获取信息
            case "getlist_byid":
                getlist_byid(context);
                break;
            default:
                //getinfo(context);
                break;
        }
    }
    //查询类型下拉选项
    public void getstoreinfo(HttpContext context)
    {
        string ysdid = PageBase.ext_string(context.Request.Params["ysdid"]);
        string sql = @"exec [zdy_查询伯俊店仓] '{0}'";
        sql = string.Format(sql, "");
        DataTable dt = DBHelper.ExecuteDataTable(sql);

        sb = new StringBuilder();
        string code = "0";
        string msg = "";
        sb.Append("{\"code\":\"" + code + "\",\"msg\":\"" + msg + "\",\"data\":[");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            sb.Append("{\"id\":\"" + dt.Rows[i]["id"].ToString() + "\"");
            //sb.Append(",\"code\":\"" + dt.Rows[i]["code"] + "\"");
            sb.Append(",\"name\":\"" + dt.Rows[i]["name"] + "\"}");
            if (i < dt.Rows.Count - 1)
            {
                sb.Append(",");
            }
        }
        sb.Append("]}");
        context.Response.Write(sb.ToString());
        context.Response.ContentType = "text/json";
        context.Response.End();
    }
    //查询图标根据id
    public void getlist_byid(HttpContext context)
    {
        string editid = PageBase.ext_string(context.Request.Params["editid"]);
        string sql = @"select id, loginid, username, password,customername,qyid,spid,ywid, email, phone, sex, role, 
                       manage_storeid, manage_storename, headpic,ltrim(rtrim(isactive)) isactive,ltrim(rtrim(islookme)) islookme, createtime, modifytime
                       from [sys_users] where id={0} ";

        sql = string.Format(sql,editid);
        DataTable dt = DBHelper.ExecuteDataTable(sql);


        sb = new StringBuilder();
        string code = "0";
        string msg = "";
        int count = 0;
        sb.Append("{\"code\":\"" + code + "\",\"count\":" + count + ",\"msg\":\"" + msg + "\",\"data\":[");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            string urlgsh = "../../" + dt.Rows[i]["headpic"];
            sb.Append("{\"id\":\"" + dt.Rows[i]["id"].ToString() + "\"");
            sb.Append(",\"loginid\":\"" + dt.Rows[i]["loginid"] + "\"");
            sb.Append(",\"username\":\"" + dt.Rows[i]["username"] + "\"");
            sb.Append(",\"password\":\"" + dt.Rows[i]["password"] + "\"");
            sb.Append(",\"customername\":\"" + dt.Rows[i]["customername"] + "\"");
            sb.Append(",\"email\":\"" + dt.Rows[i]["email"] + "\"");
            sb.Append(",\"phone\":\"" + dt.Rows[i]["phone"] + "\"");
            sb.Append(",\"sex\":\"" + dt.Rows[i]["sex"] + "\"");
            sb.Append(",\"role\":\"" + dt.Rows[i]["role"] + "\"");
            sb.Append(",\"qyid\":\"" + dt.Rows[i]["qyid"] + "\"");
            sb.Append(",\"ywid\":\"" + dt.Rows[i]["ywid"] + "\"");
            sb.Append(",\"spid\":\"" + dt.Rows[i]["spid"] + "\"");

            sb.Append(",\"manage_storeid\":\"" + dt.Rows[i]["manage_storeid"] + "\"");
            sb.Append(",\"manage_storename\":\"" + dt.Rows[i]["manage_storename"] + "\"");
            sb.Append(",\"imgurl\":\"" + urlgsh + "\"");
            sb.Append(",\"islookme\":\"" + dt.Rows[i]["islookme"] + "\"");
            sb.Append(",\"isactive\":\"" + dt.Rows[i]["isactive"] + "\"");
            sb.Append(",\"modifytime\":\"" + dt.Rows[i]["modifytime"] + "\"");
            sb.Append(",\"createtime\":\"" + dt.Rows[i]["createtime"] + "\"}");
            if (i < dt.Rows.Count - 1)
            {
                sb.Append(",");
            }
        }
        sb.Append("]}");
        context.Response.Write(sb.ToString());
        context.Response.ContentType = "text/json";
        context.Response.End();
    }
    //启用
    public void start(HttpContext context)
    {
        string getids = PageBase.ext_string(context.Request.Params["getids"]);
        string msg = "";
        bool flag;
        string sqldelete = "update  sys_users set isactive='Y' where id in ({0})";
        sqldelete = string.Format(sqldelete, getids);
        int dtcount= DBHelper.ExecuteNonQuery(sqldelete);
        if (dtcount > 0)
        {
            flag = true;
            msg = "启用成功";
        }
        else
        {
            flag = false;
            msg = "启用失败";

        }
        context.Response.Write("{\"flag\":\"" + flag + "\",\"remsg\":\"" + msg + "\"}");
        context.Response.ContentType = "text/json";
        context.Response.End();
    }
    //删除
    public void delete(HttpContext context)
    {
        string getids = PageBase.ext_string(context.Request.Params["getids"]);
        string msg = "";
        bool flag;
        string sqldelete = "update  sys_users set isactive='N' where id in ({0})";
        sqldelete = string.Format(sqldelete, getids);
        int dtcount= DBHelper.ExecuteNonQuery(sqldelete);
        if (dtcount > 0)
        {
            flag = true;
            msg = "删除成功";
        }
        else
        {
            flag = false;
            msg = "删除失败";

        }
        context.Response.Write("{\"flag\":\"" + flag + "\",\"remsg\":\"" + msg + "\"}");
        context.Response.ContentType = "text/json";
        context.Response.End();
    }

    //查询
    public void getinfo_list(HttpContext context)
    {
        //页数1
        int page = PageBase.ext_int(context.Request.Params["page"]);
        //每页条数10
        int limit =PageBase.ext_int(context.Request.Params["limit"]);
        //排序字段
        string field =PageBase.ext_string(context.Request.Params["field"]);
        //排序方式
        string order = PageBase.ext_string(context.Request.Params["order"]);

        string orderby = "createtime";
        string where = @"select  COUNT(*) OVER(PARTITION BY 1) AS TOTAL,a.id, a.loginid, a.username,a.customername,b.typename glqy,c.typename glyw,
                         d.typename glsp, a.[password], a.email, a.phone, a.sex, a.[role], 
                         a.manage_storeid, a.manage_storename, a.headpic,ltrim(rtrim(a.isactive)) isactive, a.createtime, a.modifytime
                         from [sys_users] a left join t_type b on a.qyid=b.id 
						 left join t_type c on a.ywid=c.id
						 left join t_type d on a.spid=d.id
						 where 1=1  ";
        string txt_loginid =PageBase.ext_string(context.Request.Params["txt_loginid"]);
        string txt_username =PageBase.ext_string(context.Request.Params["txt_username"]);
        string sel_roles =PageBase.ext_string(context.Request.Params["sel_roles"]);
        string sel_isactive =PageBase.ext_string(context.Request.Params["sel_isactive"]);
        //登录账户
        if (!string.IsNullOrEmpty(txt_loginid))
        {
            where += " and a.loginid like N'%" + txt_loginid + "%'";
        }
        //用户名
        if (!string.IsNullOrEmpty(txt_username))
        {
            where += " and a.username like N'%" + txt_username + "%'";
        }
        //权限
        if (!string.IsNullOrEmpty(sel_roles))
        {
            where += " and a.role ='" + sel_roles + "'";
        }
        //是否可用
        if (!string.IsNullOrEmpty(sel_isactive))
        {
            where += " and a.isactive ='" + sel_isactive + "'";
        }
        if (!string.IsNullOrEmpty(order) && !string.IsNullOrEmpty(field))
        {
            orderby =field + " " + order;
        }
        DataTable dt =  DBHelper.Pagination2(where, limit, page, orderby, "");
        sb = new StringBuilder();
        string code = "0";
        string msg = "";
        int count = 0;
        if(dt.Rows.Count>0)
            count = PageBase.ext_int(dt.Rows[0]["TOTAL"].ToString());
        sb.Append("{\"code\":\"" + code + "\",\"count\":" + count + ",\"msg\":\"" + msg + "\",\"data\":[");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            string urlgsh = "../../" + dt.Rows[i]["headpic"];
            sb.Append("{\"id\":\"" + dt.Rows[i]["id"].ToString() + "\"");
            sb.Append(",\"loginid\":\"" + dt.Rows[i]["loginid"] + "\"");
            sb.Append(",\"username\":\"" + dt.Rows[i]["username"] + "\"");
            sb.Append(",\"customername\":\"" + dt.Rows[i]["customername"] + "\"");
            sb.Append(",\"password\":\"" + dt.Rows[i]["password"] + "\"");
            sb.Append(",\"email\":\"" + dt.Rows[i]["email"] + "\"");
            sb.Append(",\"phone\":\"" + dt.Rows[i]["phone"] + "\"");
            sb.Append(",\"sex\":\"" + dt.Rows[i]["sex"] + "\"");
            sb.Append(",\"role\":\"" + dt.Rows[i]["role"] + "\"");

            sb.Append(",\"glqy\":\"" + dt.Rows[i]["glqy"] + "\"");
            sb.Append(",\"glyw\":\"" + dt.Rows[i]["glyw"] + "\"");
            sb.Append(",\"glsp\":\"" + dt.Rows[i]["glsp"] + "\"");

            sb.Append(",\"manage_storeid\":\"" + dt.Rows[i]["manage_storeid"] + "\"");
            sb.Append(",\"manage_storename\":\"" + dt.Rows[i]["manage_storename"] + "\"");
            sb.Append(",\"imgurl\":\"" + urlgsh + "\"");
            sb.Append(",\"isactive\":\"" + dt.Rows[i]["isactive"] + "\"");
            sb.Append(",\"modifytime\":\"" + dt.Rows[i]["modifytime"] + "\"");
            sb.Append(",\"createtime\":\"" + dt.Rows[i]["createtime"] + "\"}");
            if (i < dt.Rows.Count - 1)
            {
                sb.Append(",");
            }
        }
        sb.Append("]}");
        context.Response.Write(sb.ToString());
        context.Response.ContentType = "text/json";
        context.Response.End();
    }
    //查询类型下拉选项
    public void get_roles(HttpContext context)
    {
        string ysdid = PageBase.ext_string(context.Request.Params["ysdid"]);
        string sql = @"select id,rolesname,rolesremark,isactive,createtime from [sys_roles] where ltrim(rtrim(isactive))='Y'";
        DataTable dt = DBHelper.ExecuteDataTable(sql);

        string fsmessage = "";
        sb = new StringBuilder();
        string code = "0";
        string msg = "";
        sb.Append("{\"code\":\"" + code + "\",\"msg\":\"" + msg + "\",\"data\":[");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            sb.Append("{\"id\":\"" + dt.Rows[i]["id"].ToString() + "\"");
            sb.Append(",\"rolesname\":\"" + dt.Rows[i]["rolesname"] + "\"");
            sb.Append(",\"rolesremark\":\"" + dt.Rows[i]["rolesremark"] + "\"");
            sb.Append(",\"isactive\":\"" + dt.Rows[i]["isactive"] + "\"");
            sb.Append(",\"createtime\":\"" + dt.Rows[i]["createtime"] + "\"}");
            if (i < dt.Rows.Count - 1)
            {
                sb.Append(",");
            }
        }
        sb.Append("]}");
        context.Response.Write(sb.ToString());
        context.Response.ContentType = "text/json";
        context.Response.End();
    }
    //查询管理区域下拉选项
    public void get_manageqy(HttpContext context)
    {
        string ysdid = PageBase.ext_string(context.Request.Params["ysdid"]);
        string sql = @"select id,typename from t_type where typelx='管理区域' and ltrim(rtrim(isactive))='Y' order by xh";
        DataTable dt = DBHelper.ExecuteDataTable(sql);

        string fsmessage = "";
        sb = new StringBuilder();
        string code = "0";
        string msg = "";
        sb.Append("{\"code\":\"" + code + "\",\"msg\":\"" + msg + "\",\"data\":[");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            sb.Append("{\"id\":\"" + dt.Rows[i]["id"].ToString() + "\"");
            sb.Append(",\"typename\":\"" + dt.Rows[i]["typename"] + "\"}");
            if (i < dt.Rows.Count - 1)
            {
                sb.Append(",");
            }
        }
        sb.Append("]}");
        context.Response.Write(sb.ToString());
        context.Response.ContentType = "text/json";
        context.Response.End();
    }
    //查询业务下拉选项
    public void get_manageyw(HttpContext context)
    {
        string ysdid = PageBase.ext_string(context.Request.Params["ysdid"]);
        string sql = @"select id,typename from t_type where typelx='业务' and ltrim(rtrim(isactive))='Y' order by xh";
        DataTable dt = DBHelper.ExecuteDataTable(sql);

        string fsmessage = "";
        sb = new StringBuilder();
        string code = "0";
        string msg = "";
        sb.Append("{\"code\":\"" + code + "\",\"msg\":\"" + msg + "\",\"data\":[");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            sb.Append("{\"id\":\"" + dt.Rows[i]["id"].ToString() + "\"");
            sb.Append(",\"typename\":\"" + dt.Rows[i]["typename"] + "\"}");
            if (i < dt.Rows.Count - 1)
            {
                sb.Append(",");
            }
        }
        sb.Append("]}");
        context.Response.Write(sb.ToString());
        context.Response.ContentType = "text/json";
        context.Response.End();
    }
    //查询商品下拉选项
    public void get_managesp(HttpContext context)
    {
        string ysdid = PageBase.ext_string(context.Request.Params["ysdid"]);
        string sql = @"select id,typename from t_type where typelx='商品' and ltrim(rtrim(isactive))='Y' order by xh";
        DataTable dt = DBHelper.ExecuteDataTable(sql);

        string fsmessage = "";
        sb = new StringBuilder();
        string code = "0";
        string msg = "";
        sb.Append("{\"code\":\"" + code + "\",\"msg\":\"" + msg + "\",\"data\":[");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            sb.Append("{\"id\":\"" + dt.Rows[i]["id"].ToString() + "\"");
            sb.Append(",\"typename\":\"" + dt.Rows[i]["typename"] + "\"}");
            if (i < dt.Rows.Count - 1)
            {
                sb.Append(",");
            }
        }
        sb.Append("]}");
        context.Response.Write(sb.ToString());
        context.Response.ContentType = "text/json";
        context.Response.End();
    }
    //修改
    public void edit(HttpContext context)
    {
        string msg = "";
        string sqlsave = "";
        bool flag;
        GetDate list = new GetDate();
        using (System.IO.StreamReader sr = new System.IO.StreamReader(context.Request.InputStream))
        {
            string s = sr.ReadToEnd();
            list = new JavaScriptSerializer().Deserialize<GetDate>(s);
        }
        string id = Utility.Trim(list.LoadData_type[0].id);
        string txt_loginid = Utility.Trim(list.LoadData_type[0].txt_loginid);
        string txt_username = Utility.Trim(list.LoadData_type[0].txt_username);
        string customername = Utility.Trim(list.LoadData_type[0].customername);
        string password = Utility.Trim(list.LoadData_type[0].password);
        string phone = Utility.Trim(list.LoadData_type[0].phone);
        string email = Utility.Trim(list.LoadData_type[0].email);
        string imgurl = Utility.Trim(list.LoadData_type[0].imgurl);
        string managestore = Utility.Trim(list.LoadData_type[0].managestore);
        string storeid = Utility.Trim(list.LoadData_type[0].storeid);
        int? sel_roles = Utility.ToInt(list.LoadData_type[0].sel_roles);
        string sex = Utility.Trim(list.LoadData_type[0].sex);
        int? sel_manageqy = Utility.ToInt(list.LoadData_type[0].sel_manageqy);
        int? sel_managesp = Utility.ToInt(list.LoadData_type[0].sel_managesp);
        int? sel_manageyw = Utility.ToInt(list.LoadData_type[0].sel_manageyw);
        string isactive = Utility.Trim(list.LoadData_type[0].ISACTIVE);
        string isactive_= isactive == "True" ? "Y" : "N";

        string islookme = Utility.Trim(list.LoadData_type[0].ISLOOKME);
        string islookme_= islookme == "True" ? "Y" : "N";

        string ishave = "select * from sys_users where loginid='{0}' and ltrim(rtrim(isactive))='Y'";
        ishave = string.Format(ishave, txt_loginid);
        DataTable dtcount= DBHelper.ExecuteDataTable(ishave);
        if (dtcount.Rows.Count > 0 && dtcount.Rows[0]["id"].ToString() != id)
        {
            flag = false;
            msg = "已存在此登录账户，请修改";

        }
        else
        {
            sqlsave = @"update [sys_users] set 
                                   [loginid]='{0}'
                                  ,[username]='{1}'
                                  ,[password]='{2}'
                                  ,[email]='{3}'
                                  ,[phone]='{4}'
                                  ,[sex]='{5}'
                                  ,[role]={6}
                                  ,[manage_storename]='{7}'
                                  ,[manage_storeid]='{8}'
                                  ,[headpic]='{9}'
                                  ,[isactive]='{10}'
                                  ,[modifytime]='{11}'
                                  ,[islookme]='{12}'
                                  ,[customername]='{13}'
                                  ,[ywid]='{14}'
                                  ,[spid]='{15}'
                                  ,[qyid]='{16}'

                                   where id={17};";
            sqlsave = string.Format(sqlsave,txt_loginid, txt_username,password,email,phone,sex,sel_roles,managestore,
                storeid,imgurl,isactive_, DateTime.Now.ToString(),islookme_,customername,sel_manageyw,sel_managesp,sel_manageqy, id);
            int zxcount = DBHelper.ExecuteNonQuery(sqlsave);
            if (zxcount > 0)
            {
                flag = true;
                msg = "修改成功";
            }
            else
            {
                flag = false;
                msg = "修改失败，请联系管理员";
            }
        }
        context.Response.Write("{\"flag\":\"" + flag + "\",\"remsg\":\"" + msg + "\"}");
        context.Response.ContentType = "text/json";
        context.Response.End();
    }
    //新增
    public void add(HttpContext context)
    {
        string msg = "";
        string sqlsave = "";
        bool flag;
        GetDate list = new GetDate();
        using (System.IO.StreamReader sr = new System.IO.StreamReader(context.Request.InputStream))
        {
            string s = sr.ReadToEnd();
            list = new JavaScriptSerializer().Deserialize<GetDate>(s);
        }
        string txt_loginid = Utility.Trim(list.LoadData_type[0].txt_loginid);
        string txt_username = Utility.Trim(list.LoadData_type[0].txt_username);
        string customername = Utility.Trim(list.LoadData_type[0].customername);
        string password = Utility.Trim(list.LoadData_type[0].password);
        string phone = Utility.Trim(list.LoadData_type[0].phone);
        string email = Utility.Trim(list.LoadData_type[0].email);
        string imgurl = Utility.Trim(list.LoadData_type[0].imgurl);
        string managestore = Utility.Trim(list.LoadData_type[0].managestore);
        string storeid = Utility.Trim(list.LoadData_type[0].storeid);
        int? sel_roles = Utility.ToInt(list.LoadData_type[0].sel_roles);
        int? sel_manageqy = Utility.ToInt(list.LoadData_type[0].sel_manageqy);
        int? sel_managesp = Utility.ToInt(list.LoadData_type[0].sel_managesp);
        int? sel_manageyw = Utility.ToInt(list.LoadData_type[0].sel_manageyw);
        string sex = Utility.Trim(list.LoadData_type[0].sex);

        string isactive = Utility.Trim(list.LoadData_type[0].ISACTIVE);
        string isactive_= isactive == "True" ? "Y" : "N";

        string islookme = Utility.Trim(list.LoadData_type[0].ISLOOKME);
        string islookme_= islookme == "True" ? "Y" : "N";

        //string ishave = "select * from sys_users where loginid='{0}' and ltrim(rtrim(isactive))='Y'";
        string ishave = "select * from sys_users where username='{0}' and ltrim(rtrim(isactive))='Y'";
        ishave = string.Format(ishave, txt_loginid);
        DataTable dtcount= DBHelper.ExecuteDataTable(ishave);
        if (dtcount.Rows.Count > 0)
        {
            flag = false;
            msg = "已存在此登录账户，请修改";
        }
        else
        {
            sqlsave = @"INSERT INTO [sys_users]
                                   ([loginid]
                                   ,[username]
                                   ,[password]
                                   ,[email]
                                   ,[phone]
                                   ,[sex]
                                   ,[role]
                                   ,[manage_storeid]
                                   ,[manage_storename]
                                   ,[headpic]
                                   ,[isactive]
                                   ,[createtime]
                                   ,[modifytime]
                                   ,[islookme]
                                   ,[customername]
                                   ,[qyid]
                                   ,[spid]
                                   ,[ywid]
                                   )
                             VALUES
                                   ('{0}'
                                   ,'{1}'
                                   ,'{2}'
                                   ,'{3}'
                                   ,'{4}'
                                   ,'{5}'
                                   ,{6}
                                   ,'{7}'
                                   ,'{8}'
                                   ,'{9}'
                                   ,'{10}'
                                   ,'{11}'
                                   ,'{12}'
                                   ,'{13}'
                                   ,'{14}'
                                   ,'{15}'
                                   ,'{16}'
                                   ,'{17}'
                                  );";
            sqlsave = string.Format(sqlsave, txt_loginid, txt_username,password,email,phone,sex,sel_roles,
                storeid,managestore,imgurl,isactive_, DateTime.Now.ToString(), DateTime.Now.ToString(),islookme_,
                customername,sel_manageqy,sel_managesp,sel_manageyw);
            int zxcount = DBHelper.ExecuteNonQuery(sqlsave);
            if (zxcount > 0)
            {
                flag = true;
                msg = "新增成功";
            }
            else
            {
                flag = false;
                msg = "新增失败，请联系管理员";
            }
        }
        context.Response.Write("{\"flag\":\"" + flag + "\",\"remsg\":\"" + msg + "\"}");
        context.Response.ContentType = "text/json";
        context.Response.End();
    }
    public class GetDate
    {
        public List<typemanager> LoadData_type { get; set; }
    }
    public class typemanager
    {
        //id
        public string id;
        public string ID
        {
            get { return id; }
            set { id = value; }
        }
        public string txt_loginid;
        public string TXT_LOGINID
        {
            get { return txt_loginid; }
            set { txt_loginid = value; }
        }
        public string txt_username;
        public string TXT_USERNAME
        {
            get { return txt_username; }
            set { txt_username = value; }
        }
        public string customername;
        public string CUSTOMERNAME
        {
            get { return customername; }
            set { customername = value; }
        }
        public string password;
        public string PASSWORD
        {
            get { return password; }
            set { password = value; }
        }
        public string phone;
        public string PHONE
        {
            get { return phone; }
            set { phone = value; }
        }
        public string email;
        public string EMAIL
        {
            get { return email; }
            set { email = value; }
        }
        public string imgurl;
        public string IMGURL
        {
            get { return imgurl; }
            set { imgurl = value; }
        }
        public string managestore;
        public string MANAGESTORE
        {
            get { return managestore; }
            set { managestore = value; }
        }
        public string storeid;
        public string STOREID
        {
            get { return storeid; }
            set { storeid = value; }
        }
        public int? sel_roles;
        public int? SEL_ROLES
        {
            get { return sel_roles; }
            set { sel_roles = value; }
        }
        public int? sel_manageqy;
        public int? SEL_MANAGEQY
        {
            get { return sel_manageqy; }
            set { sel_manageqy = value; }
        }
        public int? sel_manageyw;
        public int? SEL_MANAGEYW
        {
            get { return sel_manageyw; }
            set { sel_manageyw = value; }
        }
        public int? sel_managesp;
        public int? SEL_MANAGESP
        {
            get { return sel_managesp; }
            set { sel_managesp = value; }
        }
        public string sex;
        public string SEX
        {
            get { return sex; }
            set { sex = value; }
        }
        public string isactive;
        public string ISACTIVE
        {
            get { return isactive; }
            set { isactive = value; }
        }
        public string islookme;
        public string ISLOOKME
        {
            get { return islookme; }
            set { islookme = value; }
        }
    }
    public bool IsReusable {
        get {
            return false;
        }
    }

}